home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 8 / The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO / prg_casm / snpd9611.zip / DIRPORT.C < prev    next >
Text File  |  1996-11-24  |  1KB  |  50 lines

  1. .I 0 4
  2. /* +++Date last modified: 16-May-1996 */
  3.  
  4. /*
  5. **  WIN 32 & OS/2 support functions for DIRPORT.H
  6. .D 1 2
  7. .I 4 6
  8. **
  9. **  15-May-96 David Nugent    Moved OS/2 functions from
  10. **                            dirport.h to here
  11. **                            Fixed for 32-bit OS/2
  12. **                            Allowed compilation under
  13. **                            DOS for easier makefiles
  14. .I 7 2
  15. /* #error "DirPort.c is NOT intended for DOS programs ..." */
  16. #else
  17. .D 8 2
  18. .I 12 23
  19. #if defined(OS2)
  20.  
  21. int FIND_FIRST (char * spec, unsigned attr, DOSFileData *ff)
  22. {
  23.   _SYSINT cnt = 1;
  24.   ff->dh = (HDIR) -1;
  25.   return (int) DosFindFirst ((PSZ)spec, &ff->dh, (_SYSINT)attr, &ff->f,
  26.                              (_SYSINT)sizeof(struct _FILEFINDBUF), &cnt, FINDLVL);
  27. }
  28.  
  29. int FIND_NEXT (DOSFileData *ff)
  30. {
  31.   _SYSINT cnt = 1;
  32.   return (int) DosFindNext (ff->dh, &ff->f, sizeof(struct _FILEFINDBUF), &cnt);
  33. }
  34.  
  35. int FIND_END (DOSFileData *ff)
  36. {
  37.   return (int) DosFindClose (ff->dh);
  38. }
  39.  
  40. #else   /* WIN32 & WINNT */
  41.  
  42. .I 92 1
  43.  
  44. .D 93 1
  45. .I 121 4
  46.  
  47. #endif /* OS/2   */
  48.  
  49. #endif /* MS-DOS */
  50.